/*
 * File: E:\Kan\ARM\Projects\Google Code\Umrichter\trunk\SimulinkModelle\slprj\ert\_sharedutils\intrp1d_2xbbb9lhbt6vdc2pqb.c
 *
 * Code generated for Simulink model 'Fu_Foc'.
 *
 * Model version                  : 1.270
 * Simulink Coder version         : 8.2 (R2012a) 29-Dec-2011
 * TLC version                    : 8.2 (Dec 29 2011)
 * C/C++ source code generated on : Sun Apr 28 18:42:25 2013
 */

#include "rtwtypes.h"
#include "rtw_shared_utils.h"

int32_T intrp1d_2xbbb9lhbt6vdc2pqb(uint32_T bpIndex, uint32_T frac, const
  int16_T table[])
{
  int32_T intermRes;

  /* Interpolation 1-D
     Canonical function name: intrp1d_is16p15s32s32_u32u32n31_l_f
     Interpolation method: 'Linear'
     Use last breakpoint for index at or above upper limit: 'off'
     Rounding mode: 'floor'
     Overflow mode: 'wrapping'
   */
  intermRes = mul_s32_s32_u32_sr16(table[bpIndex + 1U] - table[bpIndex], frac);
  return (table[bpIndex] << 15) + intermRes;
}

/*
 * File trailer for generated code.
 *
 * [EOF]
 */
